# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=trojita
pkgver=0.7_git20200313
pkgrel=0
_commit="b72f2ad0b9a6d3e825b53effc798e356ce7c499e"
arch="all !armhf !mips !mips64" # mips, armhf blocked by qt5-qtwebkit
url="http://trojita.flaska.net/"
pkgdesc="A fast and lightweight IMAP e-mail client designed with standard-compliance in mind "
license="GPL-2.0-only OR GPL-3.0-only"
makedepends="cmake qt5-qtbase-dev qt5-qttools-dev qt5-qtsvg-dev qt5-qtwebkit-dev akonadi-contacts-dev sonnet-dev gpgme-dev"
checkdepends="xvfb-run"
source="$pkgname-$_commit.tar.gz::https://github.com/kde/trojita/archive/$_commit.tar.gz
	qpainterpath.patch
	"
builddir="$srcdir/$pkgname-$_commit"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	make -C build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" make -C build install
}

sha512sums="fd2d7037794bd90dc34948064071bcddb04d213b29bb791cbdc95d0748b3f940a406913527bd8dcee3133a6dc3ace69047b0fa59b06c41953e1e24613aaee3c2  trojita-b72f2ad0b9a6d3e825b53effc798e356ce7c499e.tar.gz
a42f9604f8023aec6bfa6850bfcbbd0de22b40e5492fe5429378a9d1ecd310a05c9a6e14d7036599c6230f24c07f3eea94aa73cdf79bc9fb5668e9d2604babe4  qpainterpath.patch"
